package com.hinner.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hinner.common.Result;
import com.hinner.entity.Info;
import com.hinner.entity.enums.InstallTypeEnum;
import com.hinner.service.InfoService;
import lombok.Getter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: PengFei.He
 * @Date: 2024/11/14 19:49
 * @Function:
 */
@RestController
@RequestMapping("/info")
public class InfoController {

    @Autowired
    private InfoService infoService;






















    // 测试入库时中文是不是转成数字了
    @GetMapping("/test")
    public Result testEnum(){
        Info info = new Info();
        info.setInstallType(InstallTypeEnum.ZTGZ);
        infoService.save(info);
//        Info one = infoService.getOne(new LambdaQueryWrapper<Info>().eq(Info::getId, 1L));
//        System.out.println(one);
        return Result.success(info);
    }
}
